package com.yz.smartpos.yztester.apifuntest.tests;

import android.os.RemoteException;
import android.util.Log;
import android.widget.Toast;

import com.yz.smartpos.yztester.apifuntest.annotation.TCAction;
import com.yz.smartpos.yztester.apifuntest.annotation.TCMode;
import com.yz.smartpos.yztester.apifuntest.annotation.TCPrecondition;
import com.yz.smartpos.yztester.apifuntest.annotation.TCResult;
import com.yz.smartpos.yztester.apifuntest.annotation.TCSummary;
import com.yz.smartpos.yztester.util.ApiTestCase;
import com.yz.smartpos.yztester.util.TestCase;
import com.yz.smartpos.yztester.util.Utils;

import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

import java.util.Arrays;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 */
@RunWith(JUnit4.class)
public class Module1Test extends ApiTestCase {
    private static String TAG = "Module1Test";
    private static String Module = "Module1Test";

    public static List<TestCase> testcaseList = Arrays.asList(
            new TestCase("RunAllAuto"),
            new TestCase("RunAllAutoNotRun"),
            new TestCase("RunAllAutoFail"),
            new TestCase(0, 3, Module, "test_fun1", TestCase.AUTO),
            new TestCase(0, 4, Module, "test_fun1", TestCase.MANUAL)
    );
    private long startTime;
    private long runTime;
    private static Calendar c1;

    @Override
    public void setUp() throws Exception {
    }
    @After
    @Override
    public void tearDown() throws Exception {
        super.tearDown();
    }

    @Test
    @TCSummary("test_fun1")
    @TCPrecondition("")
    @TCAction("")
    @TCResult("")
    @TCMode("AUTO")
    public void test_fun1() {
        try {
            Logger.appendLog("test_fun1");
        } catch (Exception e) {
            Utils.printException(e);
        }
    }

    @Test
    @TCSummary("test_fun1")
    @TCPrecondition("")
    @TCAction("")
    @TCResult("")
    @TCMode("AUTO")
    public void test_fun2() {
        try {
            Logger.appendLog("test_fun1");
        } catch (Exception e) {
            Utils.printException(e);
        }
    }
}
